package com.party.notify.notifyPush.event;

import com.party.core.model.crowdfund.ProjectWithAuthor;
import com.party.core.service.crowdfund.IProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 所有众筹推送
 * Created by wei.li
 *
 * @date 2017/10/31 0031
 * @time 17:14
 */
@Service
@Component(value = "eventAllCrowdfundService")
public class EventAllCrowdfundService extends INotifyEventSendService {

    private final static String ALL_CROWDFUND = "allCrowdfundPush";

    @Autowired
    private IProjectService projectService;

    /**
     * 获取众筹列表
     * @return 众筹列表
     */
    @Override
    public List<ProjectWithAuthor> getList(String eventId) {
        return projectService.eventAllList(eventId);
    }

    @Override
    public String eventCode() {
        return ALL_CROWDFUND;
    }
}
